package com.example.tool.erp.sdk.api.sales.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.google.gson.annotations.SerializedName;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
@Data
public class TradeQueryResponse
{

	@SerializedName("total_count")
	private Integer totalCount=0;

	@SerializedName("order")
	private List<OrderItem> orders=new ArrayList<>();
     @Data
	public static class OrderItem
	{
		// 1无库存记录 2地址发生变化 4发票变化 8仓库变化16备注变化32平台更换货品64退款...512抢单异常
		public static final int BAD_REASON_ADDRESS_CHANGE = 2;
		public static final int BAD_REASON_INVOICE_CHANGE = 4;
		public static final int BAD_REASON_WAREHOUSE_CHANGE = 8;
		public static final int BAD_REASON_REMARK_CHANGE = 16; // 客服备注
		public static final int BAD_REASON_GOODS_CHANGE = 32;
		// public static final int BAD_REASON_REFUND = 64;
		// //申请退款,订单审核时通过refund_status判断
		public static final int BAD_REASON_BLOCK_GIFT = 128;
		public static final int BAD_REASON_BLOCK_SWAP = 256; // 拦截换货
		// (1.换货订单因再次申请退款而拦截
		// 2.平台换货单取消/换改退)
		public static final int BAD_REASON_BUYER_MESSAGE_CHANGE = 512; // 客户备注发生变化
		public static final int BAD_REASON_BLOCK_SYNC_LOGISTICS = 1024; // 拦截平台已发货。

		@SerializedName("logistics_name")
		private String logisticsName;

		@SerializedName("warehouse_type")
		private Integer warehouseType;

		@SerializedName("fenxiao_nick")
		private String fenxiaoNick;

		@SerializedName("post_amount")
		private BigDecimal postAmount;

		@SerializedName("trade_time")
		private String tradeTime;

		@SerializedName("receiver_ring")
		private String receiverRing;

		@SerializedName("raw_goods_type_count")
		private Integer rawGoodsTypeCount;

		@SerializedName("remark_flag")
		private Integer remarkFlag;

		@SerializedName("receiver_dtb")
		private String receiverDtb;

		@SerializedName("detail_list")
		private List<DetailItem> detailList=new ArrayList<>();

		@SerializedName("bad_reason")
		private Integer badReason;

		@SerializedName("print_remark")
		private String printRemark;

		@SerializedName("discount")
		private BigDecimal discount;

		@SerializedName("other_amount")
		private BigDecimal otherAmount;

		@SerializedName("pay_account")
		private String payAccount;

		@SerializedName("tax_rate")
		private BigDecimal taxRate;

		@SerializedName("raw_goods_count")
		private BigDecimal rawGoodsCount;

		@SerializedName("to_deliver_time")
		private String toDeliverTime;

		@SerializedName("consign_time")
		private String consignTime;

		@SerializedName("fchecker_name")
		private String fcheckerName;

		@SerializedName("trade_label")
		private String tradeLabel;

		@SerializedName("shop_remark")
		private String shopRemark;

		@SerializedName("invoice_id")
		private Integer invoiceId;

		@SerializedName("modified")
		private String modified;

		@SerializedName("shop_no")
		private String shopNo;

		@SerializedName("checker_name")
		private String checkerName;

		@SerializedName("receiver_area")
		private String receiverArea;

		@SerializedName("customer_no")
		private String customerNo;

		@SerializedName("refund_status")
		private Integer refundStatus;

		@SerializedName("receiver_province")
		private Integer receiverProvince;

		@SerializedName("buyer_message")
		private String buyerMessage;

		@SerializedName("created")
		private String created;

		@SerializedName("weight")
		private BigDecimal weight;

		@SerializedName("tax")
		private BigDecimal tax;

		@SerializedName("logistics_code")
		private String logisticsCode;

		@SerializedName("shop_name")
		private String shopName;

		@SerializedName("shop_platform_id")
		private Integer shopPlatformId;

		@SerializedName("pay_time")
		private String payTime;

		@SerializedName("src_tids")
		private String srcTids;

		@SerializedName("shop_id")
		private Integer shopId;

		@SerializedName("checkouter_name")
		private String checkouterName;

		@SerializedName("trade_no")
		private String tradeNo;

		@SerializedName("id_card_type")
		private Integer idCardType;

		@SerializedName("id_card")
		private Integer idCard;

		@SerializedName("freeze_reason")
		private String freezeReason;

		@SerializedName("single_spec_no")
		private String singleSpecNo;

		@SerializedName("salesman_name")
		private String salesmanName;

		@SerializedName("receiver_city")
		private Integer receiverCity;

		@SerializedName("invoice_title")
		private String invoiceTitle;

		@SerializedName("goods_type_count")
		private BigDecimal goodsTypeCount;

		@SerializedName("sub_platform_id")
		private Integer subPlatformId;

		@SerializedName("goods_count")
		private BigDecimal goodsCount;

		@SerializedName("cod_amount")
		private BigDecimal codAmount;

		@SerializedName("flag_name")
		private String flagName;
		@SerializedName("cancel_reason")
		private String cancelReason;
		@SerializedName("is_sealed")
		private boolean isSealed;
		@SerializedName("receiver_telno")
		private String receiverTelno;

		@SerializedName("receiver_zip")
		private String receiverZip;

		@SerializedName("warehouse_no")
		private String warehouseNo;

		@SerializedName("invoice_content")
		private String invoiceContent;

		@SerializedName("trade_status")
		private Integer tradeStatus;

		@SerializedName("post_cost")
		private BigDecimal postCost;

		@SerializedName("receiver_name")
		private String receiverName;

		@SerializedName("commission")
		private BigDecimal commission;

		@SerializedName("invoice_type")
		private Integer invoiceType;

		@SerializedName("currency")
		private String currency;

		@SerializedName("profit")
		private BigDecimal profit;

		@SerializedName("trade_from")
		private Integer tradeFrom;

		@SerializedName("delivery_term")
		private Integer deliveryTerm;

		@SerializedName("logistics_no")
		private String logisticsNo;

		@SerializedName("goods_amount")
		private BigDecimal goodsAmount;

		@SerializedName("goods_cost")
		private BigDecimal goodsCost;

		@SerializedName("receiver_district")
		private Integer receiverDistrict;

		@SerializedName("stockout_no")
		private String stockoutNo;

		@SerializedName("receivable")
		private BigDecimal receivable;

		@SerializedName("version_id")
		private Integer versionId;

		@SerializedName("receiver_mobile")
		private String receiverMobile;

		@SerializedName("buyer_nick")
		private String buyerNick;

		@SerializedName("fenxiao_type")
		private Integer fenxiaoType;

		@SerializedName("cs_remark")
		private String csRemark;

		@SerializedName("platform_id")
		private Integer platformId;

		@SerializedName("trade_type")
		private Integer tradeType;

		@SerializedName("receiver_address")
		private String receiverAddress;

		@SerializedName("logistics_type_name")
		private String logisticsTypeName;

		@SerializedName("estimate_consign_time")
		private String estimateConsignTime;

		@SerializedName("ext_cod_fee")
		private BigDecimal extCodFee;

		@SerializedName("customer_name")
		private String customerName;

		@SerializedName("delay_to_time")
		private String delayToTime;

		@SerializedName("logistics_id")
		private Integer logisticsId;
		@TableField("trade_id")
		private Long tradeId;

	}
     @Data
	public static class DetailItem
	{
		@SerializedName("suite_discount")
		private BigDecimal suiteDiscount;

		@SerializedName("spec_code")
		private String specCode;

		@SerializedName("num")
		private BigDecimal num;

		@SerializedName("goods_no")
		private String goodsNo;

		@SerializedName("suite_name")
		private String suiteName;

		@SerializedName("discount")
		private BigDecimal discount;

		@SerializedName("api_spec_id")
		private String apiSpecId;

		@SerializedName("suite_amount")
		private BigDecimal suiteAmount;

		@SerializedName("api_spec_name")
		private String apiSpecName;

		@SerializedName("remark")
		private String remark;

		@SerializedName("spec_no")
		private String specNo;

		@SerializedName("tax_rate")
		private BigDecimal taxRate;

		@SerializedName("api_goods_name")
		private String apiGoodsName;

		@SerializedName("price")
		private BigDecimal price;

		@SerializedName("modified")
		private String modified;

		@SerializedName("api_goods_id")
		private String apiGoodsId;

		@SerializedName("commission")
		private BigDecimal commission;

		@SerializedName("guarantee_mode")
		private Integer guaranteeMode;

		@SerializedName("src_tid")
		private String srcTid;

		@SerializedName("goods_name")
		private String goodsName;

		@SerializedName("refund_status")
		private Integer refundStatus;

		@SerializedName("delivery_term")
		private Integer deliveryTerm;

		@SerializedName("created")
		private String created;

		@SerializedName("weight")
		private BigDecimal weight;

		@SerializedName("gift_type")
		private Integer giftType;

		@SerializedName("order_price")
		private BigDecimal orderPrice;

		@SerializedName("from_mask")
		private Integer fromMask;

		@SerializedName("prop2")
		private String prop2;

		@SerializedName("img_url")
		private String imgUrl;

		@SerializedName("adjust")
		private BigDecimal adjust;

		@SerializedName("refund_num")
		private BigDecimal refundNum;

		@SerializedName("suite_no")
		private String suiteNo;

		@SerializedName("platform_id")
		private Integer platformId;

		@SerializedName("paid")
		private BigDecimal paid;

		@SerializedName("src_oid")
		private String srcOid;

		@SerializedName("spec_name")
		private String specName;

		@SerializedName("goods_type")
		private Integer goodsType;

		@SerializedName("share_amount")
		private BigDecimal shareAmount;

		@SerializedName("suite_num")
		private BigDecimal suiteNum;

		@SerializedName("platform_status")
		private Integer platformStatus;

		@SerializedName("share_price")
		private BigDecimal sharePrice;
	}


}